package com.jzr.board.ui.adapter.todaywork

import android.graphics.Color
import android.widget.RelativeLayout
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.jzr.board.R
import com.jzr.board.bean.BoardGetBean.DataBean.NurseLevelSumsBean
import com.jzr.board.bean.BoardGetBean


class GeneralNurseLevelAdapter(data: MutableList<BoardGetBean.DataBean.NurseLevelSumsBean>?) :
    BaseQuickAdapter<BoardGetBean.DataBean.NurseLevelSumsBean, BaseViewHolder>(
        R.layout.item_genera_nurselevel,
        data
    ) {


    override fun convert(helper: BaseViewHolder?, item: BoardGetBean.DataBean.NurseLevelSumsBean?) {
        val rlLevelName = helper?.getView<RelativeLayout>(R.id.rlLevelName)
        rlLevelName?.setBackgroundColor(Color.parseColor(item?.bgColor))
        val tvLevelName = helper?.getView<TextView>(R.id.tvLevelName)
        tvLevelName?.setTextColor(Color.parseColor(item?.fontColor))
        tvLevelName?.text = item?.levelName
        val tvPatQty = helper?.getView<TextView>(R.id.tvPatQty)
        tvPatQty?.text = item?.patQty.toString()
//        tvPatQty?.setTextColor(Color.parseColor(item?.fontColor))

    }


}